<?php
 require_once realpath('application/modules/scan_dir.class.php');
 $obj = new Scan_dir;  
 if(isset($_REQUEST['parent_id']))
  {     
      $obj->out_list_direct($_REQUEST['parent_id'], true);
  } else if(isset($_REQUEST['search_data'])) {
      $obj->search_data($_REQUEST['search_data']);
  } else if(isset($_REQUEST['type_exp'])){
      $obj->export_data($_REQUEST['type_exp'], $_REQUEST['select_out']);
  } else {
    $obj = new Scan_dir;
    // установка пути для корневого каталога 
    //$obj->folder = 'c:/Users/БК/Music/';
    $obj->initilization();
    $data = $obj->out_list_direct(1); 
    $root = $obj->root();
    include realpath('application/template/index_tpl.php');
  }
?>